/*
	Person Class
		Object
			Person
*/
import java.util.Comparator;
import org.apache.commons.lang3.StringUtils;

 public class Person implements Comparable<Person> {
	private String strUserId;
	private String strPersonId;
	private String strFirstName;
	private String strMiddleName;
	private String strLastName;
	private String strAddress1;
	private String strAddress2;
	private String strCity;
	private String strState;
	private String strZip;
	private String strEmailId;
	private int	nAge;
	private char cGender;
	private int nSSN;

	//public Person() {
	//}

	public Person(String strUid, String strPrsnId, String strFrstName, String strMidName,
					String strLstName, String strAdd1, String strAdd2, String strCty,
					String strStte, String strZp, int age, char gendr, int nssn, String strEmail) {
		this.strUserId = strUid;
		this.strPersonId = strPrsnId;
		this.strFirstName = strFrstName;
		this.strMiddleName = strMidName;
		this.strLastName = strLstName;
		this.strAddress1 = strAdd1;
		this.strAddress2 = strAdd2;
		this.strCity = strCty;
		this.strState = strStte;
		this.strZip = strZp;
		this.nAge = age;
		this.cGender = gendr;
		this.nSSN = nssn;
		this.strEmailId = strEmail;
	}

	public String lastName() {
		return this.strLastName;
	}

	public void setLastName(String toName) {
		this.strLastName = toName;
	}

	public String fullName() {
		return this.strFirstName + " " + this.strMiddleName + " " + this.strLastName;
	}

	public String midName() {
		return this.strMiddleName;
	}

	public void setMidName(String toName) {
		this.strMiddleName = toName;
	}

	public String firstName() {
		return this.strFirstName;
	}

	public void setFirstName(String toName) {
		this.strFirstName = toName;
	}

	public int age() {
		return this.nAge;
	}

	public void setAge(int age) {
		this.nAge = age;
	}

	public char gender() {
		return this.cGender;
	}

	public void setGender(char gen) {
		this.cGender = gen;
	}

	public int sSN() {
		return this.nSSN;
	}

	public void setSSN(int nssn) {
		this.nSSN = nssn;
	}

	public String userId() {
		return this.strUserId;
	}

	public void setUserId(String usrId) {
		this.strUserId = usrId;
	}

	public String iD() {
		return this.strPersonId;
	}

	public void setId(String aId) {
		this.strPersonId = aId;
	}

	public String address() {
		return this.strAddress1 + ", " + this.strAddress2 + ", " + this.strCity + ", " + this.strState + ", " + this.strZip;
	}

	public String address1() {
		return this.strAddress1;
	}

	public void setAddress1(String strAdrs1) {
		this.strAddress1 = strAdrs1;
	}

	public String address2() {
		return this.strAddress2;
	}

	public void setAddress2(String strAdrs2) {
		this.strAddress2 = strAdrs2;
	}

	public String addressCity() {
		return this.strCity;
	}

	public void setCity(String strcity) {
		this.strCity = strcity;
	}

	public String addressState() {
		return this.strState;
	}

	public void setState(String strStte) {
		this.strState = strStte;
	}

	public String addressZip() {
		return this.strZip;
	}

	public void setZip(String zip) {
		this.strZip = zip;
	}

	public String email() {
		return this.strEmailId;
	}

	public void setEmail(String strEmlId) {
		this.strEmailId = strEmlId;
	}

	public String toString() {
		return  (   this.strUserId + "," +
					this.strPersonId + "," +
					this.strFirstName + "," +
					this.strMiddleName + "," +
					this.strLastName + "," +
					this.strAddress1 + "," +
					this.strAddress2 + "," +
					this.strCity + ", " +
					this.strState + "," +
					this.strZip + "," +
					this.strEmailId + "," +
					this.nAge + "," +
					this.cGender + "," +
					this.nSSN
					);
	}

	boolean IsPerson(String strUId) {
		return StringUtils.equals(this.strUserId, strUId);
	}

	/*public int compareTo(Person aPerson) {
			String aLastName = aPerson.LastName();
			return this.strLastName.compareTo(aPerson.LastName());

	}*/

	public int compareTo(Person aPerson) {
			return this.strUserId.compareTo(aPerson.userId());
	}
}
